package com.cloud_sang.fubai.controller;

import com.cloud_sang.entity.CommonResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.client.discovery.DiscoveryClient;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.UUID;

/**
 * @ClassTitle: PaymentController
 * @ProjectName springcould2020
 * @Description:
 * @Author Sangsang
 * @Date 2020/9/9
 * @Time 16:22
 */
@RestController
@Slf4j
@RequestMapping("payment")
public class PaymentController {


	@Value("${server.port}")
	private String serverPort;

	@Resource
	private DiscoveryClient discoveryClient;


	@GetMapping("get/zk")
	public CommonResult getById() {
		log.info("**springCloud with zookeeper***端口: " + serverPort);
		return new CommonResult(200,"get成功！springCloud with zookeeper 端口号为："+serverPort+"   uuid:"+ UUID.randomUUID().toString());
	}


}
